﻿using SCM.Common;
using SqlSugar;

namespace SCM.Model.DBEntity
{
    /// <summary>
    /// 供应商表
    /// </summary>
    [SugarTable("T_Supplier")]
    public class T_Supplier : EntityBase
    {
        /// <summary>
        /// 供应商ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 所属企业ID
        /// </summary>
        public string CompanyID { get; set; }

        /// <summary>
        /// 供应商类别
        /// </summary>
        public SupplierTypeEnum SupplierType { get; set; }

        /// <summary>
        /// 供应商类别
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string SupplierTypeStr { get { return EnumHelper.GetDescription(SupplierType); } }

        /// <summary>
        /// 供应商名称
        /// </summary>
        public string SupplierName { get; set; }

        /// <summary>
        /// 短名
        /// </summary>
        public string ShortName { get; set; }

        /// <summary>
        /// 纳税人识别号
        /// </summary>
        public string IdentityNumber { get; set; }

        /// <summary>
        /// 绿色认证状态
        /// </summary>
        public GreenAVLStatusEnum GreenAVLStatus { get; set; }

        /// <summary>
        /// 绿色认证状态
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string GreenAVLStatusStr { get { return EnumHelper.GetDescription(GreenAVLStatus); } }

        /// <summary>
        /// 认证文件
        /// </summary>
        public string QualifyDocmentUrl { get; set; }

        /// <summary>
        /// 其他文件
        /// </summary>
        public string OtherDocumentUrl { get; set; }

        /// <summary>
        /// 使用状态
        /// </summary>
        public UseStatusEnum UseStatus { get; set; }

        /// <summary>
        /// 使用状态
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string UseStatusStr { get { return EnumHelper.GetDescription(UseStatus); } }

        /// <summary>
        /// 关联企业ID
        /// </summary>
        public string SupplierCompanyID { get; set; }
    }
}